﻿<?php
class Model_Orderstatus extends Zend_Db_Table_Abstract
{
	protected $_name = 'order_status';
	protected $_primary = 'os_id';

	public function createOrderstatus ($os_id,$os_ten)
	{
		$rowOrderstatus= $this->createRow();
		if ($rowOrderstatus) {
			// update the row values
			$rowOrderstatus->os_id = $os_id;
			$rowOrderstatus->os_ten = $os_ten;
			$rowOrderstatus->save();			
			//return the new product			
			return $rowProduct;
		} else {
			throw new Zend_Exception("Không thể tạo orderstatus này!!!");
		}
	}
		
	
	public static function getOrderstatusAll()
	{
		$orderstatusModel = new self();
		$select = $orderstatusModel->select();
		$select->order(array('os_id'));	
		return $orderstatusModel->fetchAll($select);
	}	

	
}